home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / mach / mach_host.defs < prev    next >
Text File  |  1994-10-24  |  9KB  |  389 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1991,1990,1989 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    mach_host.defs,v $
  29.  * Revision 2.10  92/03/10  16:26:54  jsb
  30.  *     From durriya@ri.osf.org: added host_get_boot_info.
  31.  *     [92/01/08  15:01:12  jsb]
  32.  * 
  33.  * Revision 2.9  92/02/19  16:07:19  elf
  34.  *     Reenable thread_depress_abort.
  35.  *     [92/01/20            rwd]
  36.  * 
  37.  * Revision 2.8  92/01/03  20:21:13  dbg
  38.  *     Add 'CountInOut' tag to routines returning variable-length
  39.  *     inline arrays.  Remove 'IsLong' tag from routines passing or
  40.  *     returning variable-length arrays.  Old routines left under
  41.  *     'xxx_' names.  REMOVE THESE SOON!
  42.  *     [91/11/26            dbg]
  43.  * 
  44.  * Revision 2.7  91/07/31  17:53:39  dbg
  45.  *     Add vm_wire and thread_wire.
  46.  *     [91/07/30  17:10:17  dbg]
  47.  * 
  48.  * Revision 2.6  91/05/14  16:54:32  mrt
  49.  *     Correcting copyright
  50.  * 
  51.  * Revision 2.5  91/02/05  17:33:20  mrt
  52.  *     Changed to new Mach copyright
  53.  *     [91/02/01  17:17:52  mrt]
  54.  * 
  55.  * Revision 2.4  90/09/09  14:33:08  rpd
  56.  *     Restored processor_set_create's out arguments.
  57.  *     [90/08/30            rpd]
  58.  * 
  59.  * Revision 2.3  90/08/07  18:00:21  rpd
  60.  *     Removed thread_depress_abort.  Changed host_processor_sets
  61.  *     to use unprivileged ports.
  62.  *     [90/08/06            rpd]
  63.  * 
  64.  * Revision 2.2  90/06/02  14:58:17  rpd
  65.  *     Created for new host/processor technology.
  66.  *     [90/03/26  23:51:11  rpd]
  67.  * 
  68.  *     Remove KERNEL_SERVER define.  Cleanup.
  69.  *     [89/08/02            dlb]
  70.  *     Add IsLong specifiers to variable length arguments to info calls.
  71.  *     [89/08/02            dlb]
  72.  *     Add thread_depress_abort.
  73.  *     [89/06/20            dlb]
  74.  * 
  75.  *     Add processor_set_{tasks,threads}, host_processor_sets,
  76.  *     host_processor_set_priv.
  77.  *     [89/06/08            dlb]
  78.  * 
  79.  *     Add priority and policy calls.
  80.  *     [89/05/12            dlb]
  81.  * 
  82.  *     Move type definitions to mach_types.defs, delete kernel keyword.
  83.  *     [89/01/25            dlb]
  84.  * 
  85.  *     Moved to mach/ from kern/
  86.  *     [89/01/25            dlb]
  87.  * 
  88.  *     Split processor_set_default.  Add task_assign_default and
  89.  *     thread_assign_default.
  90.  *     [88/12/21            dlb]
  91.  * 
  92.  *     Minor cleanups, add host_kernel_version.
  93.  *     [88/12/02            dlb]
  94.  * 
  95.  * Revision 2.4  89/12/22  15:54:26  rpd
  96.  *     Under KERNEL_SERVER, pass the out arguments of
  97.  *     processor_set_create as port_t's.  They really are
  98.  *     the appropriate processor set types, but processor_set_create
  99.  *     does the type conversions internally.  This isn't pretty.
  100.  *     [89/12/15            dlb]
  101.  * 
  102.  * Revision 2.3  89/10/15  02:05:40  rpd
  103.  *     Minor cleanups.
  104.  * 
  105.  * Revision 2.2  89/10/11  14:38:34  dlb
  106.  *     Add IsLong specifiers to variable length arguments to info calls.
  107.  *     Add thread_depress_abort.
  108.  *     Add processor_set_{tasks,threads}, host_processor_sets,
  109.  *            host_processor_set_priv.
  110.  *     Add priority and policy calls.
  111.  *     Split processor_set_default.  Add task_assign_default and
  112.  *            thread_assign_default.
  113.  *     Add host_kernel_version.
  114.  * 
  115.  * Revision 2.1  89/01/30  16:17:06  dlb
  116.  * Created.
  117.  * 
  118.  */
  119.  
  120. /*
  121.  * File:    mach/mach_host.defs
  122.  *
  123.  * Abstract:
  124.  *    Mach host operations support.  Includes processor allocation and
  125.  *    control.  
  126.  */
  127.  
  128. subsystem
  129. #if    KERNEL_SERVER && defined(NEW_MACH_IPC)
  130.       KernelServer
  131. #endif    KERNEL_SERVER
  132.                mach_host 2600;
  133.  
  134. /*
  135.  *    Basic types
  136.  */
  137.  
  138. #include <mach/std_types.defs>
  139. #include <mach/mach_types.defs>
  140.  
  141. /*
  142.  *    Get list of processors on this host.
  143.  */
  144.  
  145. routine host_processors(
  146.         host_priv    : host_priv_t;
  147.     out    processor_list    : processor_array_t);
  148.  
  149. /*
  150.  *    Return information about this host.
  151.  */
  152.  
  153. routine host_info(
  154.         host        : host_t;
  155.         flavor        : int;
  156.     out    host_info_out    : host_info_t, IsLong);
  157.  
  158.  
  159. /*
  160.  *    Return information about this processor.
  161.  */
  162. routine processor_info(
  163.         processor    : processor_t;
  164.         flavor        : int;
  165.     out    host        : host_t;
  166.     out    processor_info_out: processor_info_t, IsLong);
  167.  
  168. /*
  169.  *    Start processor.
  170.  */
  171.  
  172. routine    processor_start(
  173.         processor    : processor_t);
  174.  
  175. /*
  176.  *    Exit processor -- may not be restartable.
  177.  */
  178.  
  179. routine    processor_exit(
  180.         processor    : processor_t);
  181.  
  182. /*
  183.  *    Do something machine-dependent to processor.
  184.  */
  185. routine processor_control(
  186.         processor    : processor_t;
  187.         processor_cmd    : processor_info_t, IsLong);
  188.  
  189. /*
  190.  *    Get default processor set for host.
  191.  */
  192. routine processor_set_default(
  193.         host        : host_t;
  194.     out    default_set    : processor_set_name_t);
  195.  
  196. #ifndef    NeXT
  197. /*
  198.  *    Get rights to default processor set for host.
  199.  *    Replaced by host_processor_set_priv.
  200.  */
  201. routine xxx_processor_set_default_priv(
  202.         host        : host_priv_t;
  203.     out    default_set    : processor_set_t);
  204. #endif    NeXT
  205.  
  206. /*
  207.  *    Create new processor set.  Returns real port for manipulations,
  208.  *    and name port for obtaining information.
  209.  */
  210. routine processor_set_create(
  211.         host        : host_t;
  212.     out    new_set        : processor_set_t;
  213.     out    new_name    : processor_set_name_t);
  214.  
  215. /*
  216.  *    Destroy processor set.
  217.  */
  218. routine processor_set_destroy(
  219.         set        : processor_set_t);
  220.  
  221. /*
  222.  *    Get information about processor set.
  223.  */
  224. routine processor_set_info(
  225.         set_name    : processor_set_name_t;
  226.         flavor        : int;
  227.     out    host        : host_t;
  228.     out    info_out    : processor_set_info_t, IsLong);
  229.  
  230. /*
  231.  *    Assign processor to processor set.
  232.  */
  233. routine processor_assign(
  234.         processor    : processor_t;
  235.         new_set        : processor_set_t;
  236.         wait        : boolean_t);
  237.  
  238. /*
  239.  *    Get current assignment for processor.
  240.  */
  241.  
  242. routine processor_get_assignment(
  243.         processor    : processor_t;
  244.     out    assigned_set    : processor_set_name_t);
  245.  
  246. /*
  247.  *    Assign thread to processor set.
  248.  */
  249. routine    thread_assign(
  250.         thread        : thread_t;
  251.         new_set        : processor_set_t);
  252.  
  253. /*
  254.  *    Assign thread to default set.
  255.  */
  256. routine thread_assign_default(
  257.         thread        : thread_t);
  258.  
  259. /*
  260.  *    Get current assignment for thread.
  261.  */
  262. routine thread_get_assignment(
  263.         thread        : thread_t;
  264.     out    assigned_set    : processor_set_name_t);
  265.  
  266. /*
  267.  *    Assign task to processor set.
  268.  */
  269. routine task_assign(
  270.         task        : task_t;
  271.         new_set        : processor_set_t;
  272.         assign_threads    : boolean_t);
  273. /*
  274.  *    Assign task to default set.
  275.  */
  276. routine task_assign_default(
  277.         task        : task_t;
  278.         assign_threads    : boolean_t);
  279.  
  280. /*
  281.  *    Get current assignment for task.
  282.  */
  283. routine task_get_assignment(
  284.         task        : task_t;
  285.     out    assigned_set    : processor_set_name_t);
  286.  
  287. /*
  288.  *    Get string describing current kernel version.
  289.  */
  290. routine    host_kernel_version(
  291.         host        : host_t;
  292.     out    kernel_version    : kernel_version_t);
  293.  
  294. /*
  295.  *    Set priority for thread.
  296.  */
  297. routine thread_priority(
  298.         thread        : thread_t;
  299.         priority    : int;
  300.         set_max        : boolean_t);
  301.  
  302. /*
  303.  *    Set max priority for thread.
  304.  */
  305. routine thread_max_priority(
  306.         thread        : thread_t;
  307.         processor_set    : processor_set_t;
  308.         max_priority    : int);
  309.  
  310. /*
  311.  *    Set task priority.
  312.  */
  313. routine task_priority(
  314.         task        : task_t;
  315.         priority    : int;
  316.         change_threads    : boolean_t);
  317.  
  318. /*
  319.  *    Set max priority for processor_set.
  320.  */
  321. routine processor_set_max_priority(
  322.         processor_set    : processor_set_t;
  323.         max_priority    : int;
  324.         change_threads    : boolean_t);
  325.  
  326. /*
  327.  *    Set policy for thread
  328.  */
  329. routine thread_policy(
  330.         thread        : thread_t;
  331.         policy        : int;
  332.         data        : int);
  333.  
  334. /*
  335.  *    Enable policy for processor set
  336.  */
  337. routine processor_set_policy_enable(
  338.         processor_set    : processor_set_t;
  339.         policy        : int);
  340.  
  341. /*
  342.  *    Disable policy for processor set
  343.  */
  344. routine processor_set_policy_disable(
  345.         processor_set    : processor_set_t;
  346.         policy        : int;
  347.         change_threads    : boolean_t);
  348. /*
  349.  *    List all tasks in processor set.
  350.  */
  351. routine processor_set_tasks(
  352.         processor_set    : processor_set_t;
  353.     out    task_list    : task_array_t);
  354.  
  355. /*
  356.  *    List all threads in processor set.
  357.  */
  358. routine processor_set_threads(
  359.         processor_set    : processor_set_t;
  360.     out    thread_list    : thread_array_t);
  361.  
  362. /*
  363.  *    List all processor sets on host.
  364.  */
  365. routine host_processor_sets(
  366.         host        : host_t;
  367.     out    processor_sets    : processor_set_name_array_t);
  368.  
  369. /*
  370.  *    Get control port for a processor set.
  371.  */
  372. routine host_processor_set_priv(
  373.         host_priv    : host_priv_t;
  374.         set_name    : processor_set_name_t;
  375.     out    set        : processor_set_t);
  376.  
  377. skip;    /* thread_depress_abort */
  378. skip;    /* host_set_time */
  379. skip;    /* host_adjust_time */
  380. skip;    /* host_get_time */
  381. skip;    /* host_reboot */
  382. skip;    /* vm_wire */
  383. skip;    /* thread_wire */
  384. skip;    /* host_info:        MACH 3.0 */
  385. skip;    /* processor_info:    MACH 3.0 */
  386. skip;    /* processor_set_info:    MACH 3.0 */
  387. skip;    /* processor_control:    MACH 3.0 */
  388. skip;    /* host_get_boot_info:    MACH 3.0 */
  389.